Encoding/decoding apparatus and method using flexible deblocking filtering

ABSTRACT

A video decoding method includes decoding a bitstream including generating a quantized frequency transform block from the bitstream, reconstructing a residual block by inversely quantizing and inversely transforming the quantized frequency transform block, generating a prediction block by predicting a current block to be reconstructed, reconstructing the current block by adding the generated prediction block to the reconstructed residual block and performing a deblocking filtering with respect to a boundary between subblocks within a frame including the reconstructed current block, by allowing numbers of filtered pixels in a first block of the subblocks and a second block of the subblocks that engage in the filtering to be different depending on one or more predetermined criterion.

CROSS-REFERENCE TO RELATED APPLICATION

The present application is a continuation of PCT/KR2011/006823, filedSep. 15, 2011, which is based on and claims priorities to Korean PatentApplication No. 10-2011-0073306, filed on Jul. 22, 2011 and KoreanPatent Application No. 10-2011-0093139, filed on Sep. 15, 2011. Thedisclosures of above-listed applications are hereby incorporated byreference herein in their entirety.

BACKGROUND

The statements in this section merely provide background informationrelated to the present disclosure and may not necessarily constituteprior art.

Moving Picture Experts Group (MPEG) and Video Coding Experts Group(VCEG) together stepped ahead of the existing MPEG-4 Part 2 and H.263standard methods to develop a different video compression standard. Thenew standard is called H.264/AVC (Advanced Video Coding) and wasreleased simultaneously as MPEG-4 Part 10 AVC and ITU-T RecommendationH.264.

In the H.264/AVC standard, an intra/inter prediction process isperformed, in units of a block having various shapes of subblocks, togenerate a residual signal. A transform and a quantization step areperformed on the generated residual block to reduce the number of bitsof the generated residual block before entering an encoding operation. Amacroblock encoding operation, as viewed from the encoder side, includesdividing an input image into 16×16 macroblock units, performing aprediction on each macroblock (in the level of a subblock sizedaccording to the inter/intra mode) to generate a residual block,processing the generated residual block with an integer transform basedon a discrete cosine transform (DCT) in 4×4 or 8×8 unit to generatefrequency coefficients, and quantizing the frequency coefficientsaccording to a quantization parameter (QP). Afterwards, blockingartifacts resulting from the transform and quantization process, may bereduced by using a deblocking filtering.

In order to remove the blocking artifacts, an algorithm is used toimprove the subjective/objective performance of the image by performinga more efficient deblocking filtering.

SUMMARY

In some embodiments, a video encoding apparatus comprises a videoencoder and a deblocking filter. The video encoder is configured togenerate a prediction block by predicting a current block, generate aresidual block by subtracting the prediction block from the currentblock, encode the residual block by transforming and quantizing theresidual block, reconstruct the residual block by inversely quantizingand inversely transforming the transformed and quantized residual block,and reconstruct the current block by adding the prediction block to thereconstructed residual block. Further, the deblocking filter isconfigured to filter a boundary between subblocks within a frameincluding the reconstructed current block, wherein a first subblock ofthe subblocks and a second subblock of the subblocks that engage in thefiltering are different from each other in numbers of filtered pixels,depending on one or more predetermined criterion.

In some embodiments, a video decoding apparatus comprises a bitstreamdecoder, an inverse quantization and inverse transform unit, aprediction unit, an adder and a deblocking filter. The bitstream decoderis configured to generate a quantized frequency transform block from abitstream. The inverse quantization and inverse transform unit isconfigured to reconstruct the current block by inversely quantizing andinversely transforming the quantized frequency transform block. Theprediction unit is configured to generate a prediction block from acurrent block. The adder is configured to reconstruct the current blockby adding the generated prediction block to the reconstructed residualblock. And the deblocking filter is configured to filter a boundarybetween subblocks within a frame including the reconstructed currentblock, wherein a first subblock of the subblocks and a second subblockof the subblocks that engage in the filtering are different from eachother in numbers of filtered pixels, depending on one or morepredetermined criterion.

In some embodiments, a video decoding method comprising decoding abitstream comprising generating a quantized frequency transform blockfrom a bitstream; reconstructing a residual block by inverselyquantizing and inversely transforming the reconstructed quantizedfrequency transform block; generating a prediction block by predicting acurrent block to be reconstructed; reconstructing the current block byadding the generated prediction block to the reconstructed residualblock; and performing a deblocking filtering with respect to a boundarybetween subblocks within a frame including the reconstructed currentblock, by allowing numbers of filtered pixels in a first block of thesubblocks and a second block of the subblocks that engage in thefiltering to be different depending on one or more predeterminedcriterion.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of a configuration of a video encodingapparatus according to at least one embodiment;

FIG. 2 is an exemplary diagram of block P and block Q subject to adeblocking filtering according to at least one embodiment;

FIG. 3 is an exemplary diagram illustrating an implementation of adeblocking filtering according to at least one embodiment;

FIG. 4 is an exemplary diagram illustrating an implementation of adeblocking filtering according to at least one embodiment;

FIG. 5 is an exemplary diagram of a degree of linearity determination inblock units according to at least one embodiment;

FIG. 6 is an exemplary diagram of a degree of linearity determination inblock units according to at least one embodiment;

FIG. 7 is a block diagram of a configuration of a video decodingapparatus according to at least one embodiment; and

FIG. 8 is an exemplary diagram of a process for determining the targetpixel to be filtered according to at least one embodiment.

DETAILED DESCRIPTION

Hereinafter, at least one embodiment of the present disclosure will bedescribed in detail with reference to the accompanying drawings. In thefollowing description, like reference numerals designate like elementsalthough the reference numerals are shown in different drawings.Further, in the following description of the present embodiments, adetailed description of known functions and/or configurationsincorporated herein will be omitted for the purpose of clarity and forbrevity.

Additionally, in describing various components of the presentdisclosure, terms like first, second, A, B, (a), and (b) are used solelyfor the purpose of differentiating one component from another, but oneof ordinary skill would understand the terms do not imply or suggest thesubstances, order or sequence of the components. If a component isdescribed as ‘connected’, ‘coupled’, or ‘linked’ to another component,one of ordinary skill would understand the components are notnecessarily directly ‘connected’, ‘coupled’, or ‘linked’ but also areindirectly ‘connected’, ‘coupled’, or ‘linked’ via at least oneadditional third component.

Hereinafter, a video encoding apparatus and/or a video decodingapparatus in accordance with some embodiments described below may beuser terminals such as a personal computer (PC), a notebook computer, atablet, a personal digital assistant (PDA), a game console, a portablemultimedia player (PMP), a PlayStation Portable (PSP), a wirelesscommunication terminal, a smart phone, a TV, a media player, and thelike. A video encoding apparatus and/or a video decoding apparatusaccording to one or more embodiments may correspond to server terminalssuch as an application server, a service server and the like. A videoencoding apparatus and/or a video decoding apparatus according to one ormore embodiments may correspond to various apparatuses each including(a) a communication unit apparatus such as a communication modem and thelike for performing communication with various types of devices or awired/wireless communication network, (b) a memory for storing varioustypes of programs and data for encoding or decoding a video, orperforming an inter or intra prediction for the encoding or decoding,and (c) a microprocessor and the like for executing the program toperform an operation and control. According to one or more embodiments,the memory comprises a computer-readable recording/storage medium suchas a random access memory (RAM), a read only memory (ROM), a flashmemory, an optical disk, a magnetic disk, a solid-state disk, and thelike. According to one or more embodiments, the microprocessor isprogrammed for performing one or more of operations and/or functionalitydescribed herein. According to one or more embodiments, themicroprocessor is implemented, in whole or in part, by specificallyconfigured hardware (e.g., by one or more application specificintegrated circuits or ASIC(s)).

Further, a video encoded into a bitstream by the video encodingapparatus may be transmitted in real time or non-real-time to the videodecoding apparatus through wired/wireless communication networks such asthe Internet, wireless short range or personal area network (WPAN),wireless local area network (WLAN), WiBro (wireless broadband, akaWiMax) network, mobile communication network and the like or throughvarious communication interfaces such as a cable, a universal serial bus(USB) and the like. According to one or more embodiments, the bit streamis decoded in the video decoding apparatus and reconstructed andreproduced as the video. According to one or more embodiments, the bitstream is stored in a computer-readable recording/storage medium.

FIG. 1 is a block diagram of an arrangement of a video encodingapparatus 100 according to at least one embodiment.

The video encoding apparatus 100 according to at least one embodimentincludes a predictor 110, a subtracter 120, a transformer and quantizer130, a scanner 140, a bitstream generator 150, an inverse quantizer andinverse transformer 160, an adder 170, and a deblocking filter 180. Aninput image to be encoded may be entered in units of blocks. In someembodiments, the shape of the block can be M×N where M and N are each anatural number of 2n (where n is an integer of 1 or larger). In someembodiments, M and N each can be greater than 16 or different from eachother or the same. In some embodiments, each frame, to be encoded, canhave a different shape of blocks, and then video encoding apparatus 100is configured to encode information of the different block types, frameby frame, such that a video decoding apparatus configured to decode theencoded data will know the shape of blocks of a frame to be decoded. Insome embodiments, the video encoding apparatus 100 is configured todetermine one or more shape of blocks for use by selecting the mostefficient block shape from one or more shapes of blocks obtained byencoding the current frame or making a block shape selection accordingto an analysis of the frame characteristics.

In some embodiments, if the image of a frame has a higher correlation inthe horizontal direction, horizontal elongated blocks can be selected.For example, with a higher correlation in the vertical direction,vertically elongated blocks can be selected.

In some embodiments, video encoding apparatus 100 may further include ablock type determiner (not shown), which is configured to determine ablock type and is configured to encode and include information on theblock type in the encoded data.

In some embodiments, the video encoding apparatus 100 comprises thepredictor 110, subtracter 120, transformer and quantizer 130, scanner140, bitstream generator 150, inverse quantizer and transformer 160, andadder 170.

The predictor 110 is configured to generate a predicted block from theinput image. In some embodiments, the predictor 110 is configured topredict the block to be currently encoded (hereinafter, referred to ascurrent block) from the input image. In other words, the predictor 110predicts the current block of the input image by using intra, inter orother predictions and thereby, generates a predicted block, which haspredicted pixel values for the respective pixel values.

In some embodiments, in order to optimize the predicted pixel value, theblock can be subdivided into smaller shapes of blocks, as needed. Inother words, the predicted block can be generated in units of subblocks,subdivided from the block. In some embodiments, the block is an M×Nshape that is a square or rectangle, and the subblocks may not exceedthe size of the current block, but the subblocks are sized 2phorizontally and 2q vertically, wherein p and q can be the same ordifferent from each other.

The subtractor 120 subtracts the predicted block from the current blockto generate a residual block. In other words, the subtractor 120calculates the difference value of the predicted pixel values of therespective pixels of the predicted block from the original pixel valuesof the current block, to generate a residual block having a residualsignal.

The transformer and quantizer 130 determines one or more transform andquantization types according to the block type of the current block, andperforms the transform and quantization operations on the residual blockaccording to the determined transform and quantization types.

In some embodiments, the current block, predicted block or residualblock may be different in size from a transform block that is subject tothe transform and quantization operations. In some embodiments, the sizeof the transform block for the transform and quantization operations isselected in a range that does not exceed the size of the residual block.In some embodiments, the transform block size may be selected to exceedthe residual block size. In some embodiments, the transform block is ablock that is a unit of the transform and comprises one or moretransform coefficients or one or more pixel values. For example, thetransform block refers to an R×S transform coefficient block, which isencoded by an R×S sized transform or refers to an R×S pixel block, whichis decoded with an R×S sized inverse transform.

The video encoding apparatus 100 according to some embodiments performsthe residual block transform with multiple transform sizes, including4×4, 8×4, 4×8, 8×8, 16×8, 8×16 or 16×16, before selecting the mostefficient transform for encoding.

For example, if the intra-prediction or inter-prediction is performed bya 16×16 block unit, one or more of the current block, prediction blockor residual block may be commonly sized as 16×16. In this example, uponreceiving the 16×16 residual block, the transform and quantization unit130 divides the 16×16 residual block into two 16×8 subblocks, and thencarries out a 16×8 transform to output a pair of 16×8 transformcoefficient blocks.

The transform and quantization unit 130 transforms a residual signal ofthe residual block into the frequency domain to generate a residualblock having transform coefficients, and then quantizes the residualblock having transform coefficients to generate a transformed andquantized residual block having quantized transform coefficients.

In some embodiments, the transform method may be the Hadamard transform,discrete cosine transform based integer transform (hereinafterabbreviated as integer transform) or other such techniques fortransforming image signals in spatial domain into the frequency domain.In some embodiments, the quantization method includes the dead zoneuniform threshold quantization (hereinafter abbreviated as ‘DZUTQ’),quantization weighted matrix and various other methods.

The scanner 140 scans the quantized transform coefficients of theresidual block (transformed and quantized by the transform andquantization unit 130) to generate a string of quantized transformcoefficients. In some embodiments, scanner 140 accounts for thetransform scheme, quantization scheme and characteristics of a block(current block or subblock). In some embodiments, a sequence of scanningis determined by the scanner 140 to provide the shortest possible stringof quantized transform coefficients after scanning. In some embodiments,the scanner 140 may be omitted from FIG. 1 and the operations of scanner140 are incorporated into the bitstream generator 150.

The bitstream generator 150 generates encoded data by encoding theblocks of frequency coefficients that are quantized and transformed. Insome embodiments, the bitstream generator 150 encodes the string ofquantized transform coefficients generated by scanning the transformedand quantized coefficients from the transform and quantization unit 130to generate the encoded data. In some embodiments, the bitstreamgenerator 150 encodes the string of quantized transform coefficientsgenerated by the operation of the scanner 140 to generate the encodeddata.

The encoding technique of the bitstream generator 150 may use theentropy encoding technique, but it is not limited thereto and variousother encoding techniques may also be used. In some embodiments, thebitstream generator 150 can include in the encoded data, not only theencoded bit string from encoding the quantized transform coefficientsbut also various information required for decoding the encoded bitstring. In some embodiments, the various information comprisesinformation on the block type, information on intra prediction modes ifthe prediction mode is the intra prediction mode, information on amotion vector if the prediction mode is an inter prediction mode,information on the transform and quantization types or the like,including various other information.

The inverse quantization and inverse transform unit 160 performs theinverse quantization and inverse transform, on the frequency coefficientblock transformed and quantized by the transform and quantization unit130, to reconstruct the residual block. In some embodiments, the inversetransform and inverse quantization can be performed by reversing thequantization and transform process performed by the transform andquantization unit 130. In some embodiments, the inverse quantization andtransform unit 160 utilizes transform and quantization-relatedinformation (for example, information on the transform and quantizationtypes) provided by the quantized and transform unit 130 to carry out theinverse transform and inverse quantization by performing the reverse ofthe quantization and transform process of the transform and quantizationunit 130.

The adder 170 adds the prediction block, predicted by the predictor 110,and the residual block, that is inversely quantized and inverselytransformed by the inverse quantization and inverse transform unit 160,to reconstruct the current block.

The deblocking filter 180 performs a deblocking filtering on thereconstructed block from the adder 170. In some embodiments, thedeblocking filtering may be carried out block by block or collectivelyin units of frames or in other various manners. The unit of thedeblocking filter of the present disclosure is not limited to thedescription in at least one embodiment.

The deblocking filter 180 reduces blocking artifacts that occur at theblock boundary or transform boundary due to the block-based prediction,transform and quantization of video. In some embodiments, the deblockingfilter 180 can perform filtering by using information on thequantization and transform types that is sent along with thereconstructed current block. The information on the quantization andtransform types may be transferred to the deblocking filter 180.

For the purpose of filtering from subblock to subblock within a framecontaining one or more reconstructed current blocks, the deblockingfilter 180 performs a filtering with respect to a boundary betweensubblocks within a frame including one or more reconstructed currentblock. In some embodiments, the deblocking filter 180 processes a firstsubblock and a second subblock involved in the filtering: (a) byallowing a number of pixels filtered in the first subblock and thesecond subblock to be different depending on a predetermined criteria or(b) by applying one or more different pixel disparity values accordingto pixel positions relative to the boundary between the first and thesecond subblocks. In some embodiments, the predetermined criteria may bedefined as a linearity of pixel values in a row of pixels in thedirection of depth from the boundary between the first and the secondsubblocks. In some embodiments, the predetermined criteria is alinearity of values of subblocks in the direction of depth from theboundary between the first and the second subblocks. In someembodiments, a frame is the unit by which the deblocking filtering isperformed and the frame includes one or more blocks in a set. In someembodiments, the subblock is a predetermined block unit (for example,prediction unit or transform-quantization unit) of a divided block in aframe on which the deblocking is performed. In some embodiments, a blockmay be a subblock of the frame. In some embodiments, for the deblockingfilter 760 in a video decoding apparatus 700, a block may be a subblockof the frame.

In some embodiments, the predetermined criteria in the blocking filterwhich determines the filtering method comprises the relative sizes ofblocks P, Q, or linearity as will be described later. Based on variouspredetermined criteria, one or more embodiments of the presentdisclosure can change the number and location of the pixels to befiltered by block basis or row basis.

In some embodiments, in order to eliminate blocking artifacts, thedeblocking filter 180 is responsive to a block boundary between twoblocks (say M×N macroblocks), a boundary between the transform blocks ofR×S transform size determined by the transform and quantization unit 130and a boundary between a transform block and a block. The shape of theR×S transform block may be a square or rectangle. In some embodiments,the blocking artifacts occur from the transform and quantizationperformed by the transform unit 130. To eliminate the blockingartifacts, the deblocking filter 180 can be applied to both the blockboundary and the transform boundary. As a result, the filteringperformed by the blocking filter 180 can be applied to the block ortransform boundaries by the forms of the block and transform. In someembodiments, the block boundary is a boundary between two predictions.In some embodiments, the application of the deblocking filteringperformed by the blocking filter 180 to the transform boundary and/orthe prediction boundary can be implemented during different conditions.In some embodiments, the deblocking filter may not be applied whenquantized non-zero transform coefficients are not utilized.

FIG. 2 is a diagram of block P and block Q subject to a deblockingfiltering according to one or more embodiments.

For example, referring to FIG. 2, the deblocking filter 180 is describedas performing a deblocking filtering operation of the boundary 202located between block P and block Q. In this example, the deblockingfilter operation is performed on the first row of pixels(p_(3,0)˜q_(3,0)). in block P and block Q. In the present disclosure,for simplicity, pixels (p_(3,0)˜q_(3,0)) will be referred to as (p₃˜q₃).The deblocking filter 180 can perform the deblocking filtering of thesingle row of pixels p_(3,0)˜q_(3,0) by modifying the pixels in block Pand block Q by the same number and/or same positions. At least oneembodiment includes two pixels to modify at either side of the boundary.In at least one embodiment, the pixels included in block P are p₃, p₂,p₁ and p₀, and those included in block Q are q₃, q₂, q₁ and q₀.

FIG. 3 is an exemplary diagram which illustrates a deblocking filteringoperation according to at least one embodiment. As shown in FIG. 3, thesolid lines connect pixels before the filtering operation and the dottedlines connect the pixels after the filtering operation.

One or more embodiments of the detailed filtering operation of thedeblocking filter 180 is as follows.

In some embodiments, the deblocking filter 180 performs the filteringoperation by utilizing Equation 1. Equation 1 calculates the value ofdelta A. In some embodiments, the deblocking filter 180 performs thedeblocking filtering operation by applying pixel disparities (e.g., Δand Δ/2) for blocks P and Q in Equation 2.

Δ=Clip3(−t _(c) ,t _(C),(((q ₀ −p ₀)<<2)+(q ₁ −p ₁)+4)>>3)  Equation 1

p ₁ ′=p ₁+Δ/2

p ₀ ′=p ₀+Δ

q ₀ ′=q ₀−Δ

q ₁ ′=q ₁−Δ/2  Equation 2

The function of Clip3 (A, B, x) in Equation 1 is a clipping functionwhich outputs the value B if the value of x is greater than B, outputsthe value A if the value of x is less than A, and otherwise outputs thevalue x. Additionally, p₀, q₀, p₁ and q₁ in Equation 1 are pre-filtervalues and p_(0′) or q_(0′) p_(1′) and q_(1′) are post-filter values. InEquation 1, “(q₀−p₀)<<2” portion uses the filtering coefficient of 2,which means to shift (q₀−p₀) by two (2) bits to the left side orquadrupling the same and the “(q₁−p₁)” portion is multiplied by one (1),and therefore the filtering coefficient is (4, 1). The last part ofEquation 1, “>>3” is a 3 bit-shift to the right, and therefore thefiltering coefficient may be ( 4/8, ⅛). Further, in the “(q₁−p₁)+4”portion, added value 4 is an offset value for integerizing the filteredresult. Accordingly, in some embodiments, (4, 1, 4) or ( 4/8, ⅛, 4/8)may be regarded as the filter coefficient. These filter coefficients aresimply illustrative examples and other filter coefficients than thosedescribed in Equation 1 may be used. This also applies to other filtersdescribed hereinafter and other coefficients are applicable withoutrestriction to the disclosed equations and filter coefficients. In someembodiments, deblocking filter 180 is configured to perform a deblockingfiltering operation by utilizing a same filter coefficient with respectto both of the luminance signal value luma and color-difference signalvalue chroma.

In some embodiments, employing a higher value of t_(c) can provide astrong filtering and a lower value thereof can provide a weak filtering,and the value of t_(c) can be used to adjust the range of pixeldisparity. In some embodiments, a filtering parameter as t_(c) may bepredefined by a user, or it may be transmitted from a video encodingapparatus 100 to a video decoding apparatus 700, or it may be a user'spreset value which is subsequently readjusted for gradual correctionswith appropriate offset values transmitted from the video encodingapparatus 100 to the video decoding apparatus 700. In some embodiments,the offset values may be transmitted to the video decoding apparatus 700through the deblocking filter 180 or a separate offset value transmitter(not shown).

The delta value Δ determined by Equation 1 is used to obtain the pixeldisparity which is then used to change the pixel values as in Equation2.

Equation 2 is an exemplary implementation which illustrates how thestrength of filtering may be adjusted according to predeterminedcriteria. In the exemplary implementation, the position of the pixel tobe filtered is the predetermined criteria, by which (pixel position)different pixel disparities are used to adjust the strength offiltering. Specifically, as pixel disparities, delta is used for a firstpixel (p₀ or q₀) and delta/2 is used for a second pixel (p₁ or q₁). Thisensures disparities to be minimized even when the process of minimizinga disparity in inter-block boundary pixels (p₀|q₀) between two blocks Pand Q causes a new disparity in in-block pixel boundary (p₁|p₀) or(q₀|q₁) in P or Q. In other words, minimizing the disparities at theblock boundary may in turn cause disparities within a block, which arenow minimized according by implementation of the present method.

In some embodiments, to minimize the difference between the pixels(p₁|p₀) or (q₀|q₁) in the P block or the Q block which can be newlygenerated in the process of minimizing the difference between the pixels(p₀ or q₀) on the boundary of the P block or the Q block, new deltavalues (Δp, Δq) are calculated through a new filtering operation for thepixels (p₁ or q₁) in the block P or the block Q as shown in Equation 3.The new delta values are applied to the pixels in the P block or the Qblock, respectively, in order to performing the deblocking filteringoperation.

Δp=Clip3(−t _(c) ,t _(c),(((p ₀ −p ₁)<<2)+(q ₀ −p ₂)+4)>>3)

Δq=Clip3(−t _(c) ,t _(c),(((q ₁ −q ₀)<<2)+(q ₂ −p ₀)+4)>>3)  Equation 3

In short, pixel disparity value Δp is used for an internal pixel p₁ ofthe block P, and Δq is used for an internal pixel q₁ of the block Q.Aforementioned Equations 1 and 2 is an example of calculating the samedelta for both the blocks P and Q, whereas Equation 3 is an example ofcalculating different values of delta for blocks P and Q, respectively.

In some embodiments, the process of determining the pixel disparityvalue and adjusting the pixel value may use Equation 2, while allowingthe values of delta determined by Equation 3 to be used for the pixelsof blocks P and Q. This satisfies p₀′=p₀+delta_p, q₀′=q₀−delta_q,p₁′=p₁+delta_p/2 and q₁′=q₁−delta_q/2.

Although the same filter was described as applied to calculating thevalues of delta shown in Equations 1 and 3, filters of differentcoefficients may be used for calculating the values of delta to beapplied to blocks P and Q respectively.

According to another embodiment of the present disclosure, in performinga deblocking filtering operation for the P/Q block boundary 202 as shownin FIG. 2, the deblocking filtering operation performed by thedeblocking filter 180 such that the number and/or position of pixels tobe filtered in block P is different from the number and/or position ofpixels to be filtered in block Q, by applying a predetermined criteriato rows of pixels included in the P and Q blocks.

FIG. 4 is an exemplary diagram which illustrates a deblocking filteringoperation according to at least one embodiment.

As shown in FIG. 4, an example of modifying one pixel in block P and twopixels in block Q relative to the block boundary is disclosed. Besidesthe pixel value adjustments with the same number (e.g., 2) of pixels onboth sides of the P/Q block boundary as described above, someembodiments may have pixel adjustments with a different number of pixelsto be adjusted on both sides of the boundary 202.

Referring to FIG. 4, block P has a prominent value at pixel p1 relativeto the surrounding pixels, while the pixel values in block Q are smoothprior to filtering. In some embodiments, one or more images can beimproved in subjective quality by filtering the closest pixel (p0) tothe border on the block P side and filtering two border side pixels inthe block Q side. In this embodiments, the numbers and positions ofpixels subject to deblocking filtering by block P and block Q aredifferentiated.

In the example embodiment illustrated by FIG. 4, the specific filteringoperation of the deblocking filter 180 is as follows.

After calculating values of delta by using Equation 1, the deblockingfilter 180 is configured to perform deblocking filtering on a differentnumber of block P pixels and block Q pixels as shown in Equation 4.

p ₀ ′p ₀−Δ

q ₀ ′=q ₀+Δ

q ₁ ′=q ₁+Δ/2  Equation 4

In this embodiment, the predetermined criteria (for determining thenumber and position of pixels to be filtered) may be defined in variousways, depending on the application of the present disclosure, forexample by utilizing methods such as Equation 5, which measures thedegree of linearity of pixels d_(p)0, d_(q)0.

d _(p0) =|p ₂−2*p ₁ +p ₀|<beta

d _(q0) =|q ₂−2*q ₁ +q ₀|<beta  Equation 5

In other words, with respect to the respective blocks P and Q, the pixellinearities (i.e., d_(p0) and d_(q0)) are measured in the depthdirection of subblocks about the block boundary 202, and themeasurements are compared to a predetermined threshold (beta). Forexample, when condition (d_(p0)<beta) is satisfied, filtering is carriedout on p₁; otherwise, no filtering is performed on the same. Likewise,when condition (d_(q0)<beta) is satisfied, filtering is carried out onq₁; otherwise, no filtering is performed on the same. In someembodiments, the threshold (beta) is set in various methods, and it mayassumed to be prearranged between the video encoding apparatus 100 andvideo decoding apparatus 700, or provided by the degree of quantizationor a downloaded value from a user (who is on the side of the videoencoding apparatus 100 or video decoding apparatus 700), or set up byfirst defining a predetermined value or a quantization-dependentsetpoint and subsequently adding thereto an offset adjustment as inputby the user (with the offset transmitted from the video encodingapparatus 100 to the video decoding apparatus 700). In some embodiments,the offset value can also be transmitted to the video decoding apparatus100 by using the deblocking filter 180 or a separate offset valuetransmission unit (not shown). Further, the depth direction of thesubblocks corresponds to the direction of p₀→p₁→p₂ in block P from theblock boundary and the direction of q₀→q₁→q₂ in block Q, as shown inFIG. 4.

FIG. 5 is an exemplary diagram of a degree of linearity determination inblock units according to one or more embodiments.

In some embodiments, the above-described operation for determiningpixels to filter by the predetermined criteria may be performed in unitsof rows of pixels as shown in Equation 5, or it may be performed asshown in FIG. 5 in block units (e.g., units of subblocks in a frame), orit may be applied as shown in Equation 6 where the resultingdetermination is applied to all the rows of pixels of the correspondingblock.

d _(p0) =|p _(2,2)−2*p _(1,2) +p _(0,2) |+|p _(2,5)−2*p _(1,5) +p_(0,5)|<beta

d _(q0) =|q _(2,2)−2*q _(1,2) +q _(0,2) |+|q _(2,5)−2*q _(1,5) +q_(0,5)|<beta  Equation 6

The uniform application of filtering all pixels per block, as shown inEquation 6, in some embodiments, may disable making individualdeterminations for individual pixel rows, but the predetermineddetermination is not performed on every pixel row resulting in a fasteroperation. Referring to FIG. 2, where a group of pixels in eight rowsmakes up a block, an example of the application of Equation 6 is to usepixels within the second and fifth rows as the representative values ofthe block. In this example, one or more representative pixel rows may beselected within a subblock and the pixel linearities for therepresentative pixel rows may be used to obtain the subblock level oflinearity.

For example, if block P is nonlinear, but block Q is linear, as shown inthe example of FIG. 4, the nonlinearity of block P can be based on theimage to justify the single pixel to be filtered in block P, while thecharacteristically high linearity of the image of block Q may justifythe two pixels therein to be filtered, in order to maintain the desiredlinearity even after the deblocking filtering.

In this example, based on the predetermined criteria as shown in FIG. 4and Equation 7, different delta values are applied according to thepositions of the respective pixels (e.g., delta for the first pixel anddelta/2 for the second pixel) to minimize the difference between thepixels (p₀|q₀) at the border 202 of the blocks P and Q, which minimizesthe difference between the Q block pixels (q₀|q₁). Asymmetric values ofdelta relative to the boundary 202 are shown in Equation 7.

p ₁ ′=p ₁

p ₀ ′=p ₀−Δ

q ₀ ′=q ₀+Δ

q ₁ ′=q ₁+Δ/2  Equation 7

Alternatively, the delta value for the first pixel p₀ in block P can beadjusted so as to minimize the difference between the pixels (p₀|p₁) inblock P. For example, delta/2 may be applied to the first pixel of theblock P as shown in Equation 8.

p ₁ ′=p ₁

p ₀ ′=p ₀−Δ/2

q ₀ ′=q ₀+Δ

q ₁ ′=q ₁+Δ/2  Equation 8

In some embodiments, fixed pixel disparities (for example, a delta forthe first pixel and delta/2 for the second pixel) may be used for thepixels subject to the deblocking filtering operation performed bydeblocking filter 180 regardless of the pixel numbers and/or positions.In some embodiments, the pixel disparities may be variably used for thepixels subject to the deblocking filtering depending on the pixelnumbers and/or positions, e.g., a delta is utilized for the first pixelof two pixels to be filtered and delta/2 is utilized for the remainingsecond pixel, and delta/2 is utilized for a single pixel to be filtered.

In addition, although some embodiments illustrate that up to two pixelsare filtered, filtering one or a plurality (identifiable as V) of pixelsin the manner disclosed herein will be understood by those skilled inthe art. In some embodiments, the pixel disparities may be variably usedfor the pixels subject to the deblocking filtering operation performedby the deblocking filter 180 depending on the pixel numbers and/orpositions, e.g., a delta for the first pixel of V pixels and delta/2 forthe second pixel of the V pixels, and so on up to delta/V for the Vthpixel. In at least one embodiment, the pixel disparities may be obtainedby multiplying a single delta by weights determined in accordance withthe respective positions of the V pixels.

In some embodiments, the weighted values can be assumed to be previouslydetermined respectively in the video encoding apparatus 100 and thevideo decoding apparatus 700 and they can be transmitted by the user (onthe side of the video encoding apparatus 100). In some embodiments, thedeblocking filtering operation can be performed by a method ofcalculating a new delta according to the number and/or position of eachpixel.

Although linearity criteria as shown Equation 5 or 6 may be appropriateas the predetermined criteria for determining the number and positionsof the pixels as described above, some embodiments (e.g., as when V isvery large) may be provided with an additional criterion as that shownby Equation 9.

d _(p0) =|p ₃−2*p ₂ +p ₁|<beta

d _(q0) =|q ₃−2*q ₂ +q ₁|<beta  Equation 9

FIG. 6 is an exemplary diagram of a degree of linearity determination inblock units according to one or more embodiments.

Although the criterion in Equation 9 is applied to each row of pixels,it can be uniformly applied to each entire block by using Equation 10,as shown in FIG. 6.

d _(p0) =|p _(3,2)−2*p _(2,2) +p _(1,2) |+|p _(3,5)−2*p _(2,5) +p_(1,5)|<beta

d _(q0) =|q _(3,2)−2*q _(2,2) +q _(1,2) |+|q _(3,5)−2*q _(2,5) +q_(1,5)|<beta  Equation 10

In some embodiments, a plurality of filters may be prepared withdifferent properties (e.g., number and/or positions of pixels whichengage in filtering, filtering strength, etc.) and different filters maybe applied in a predetermined unit (e.g., in units of pixel row, blockunits and so on) based on a predetermined criteria. For example, in oneembodiment, a single filter is configured to calculate the delta valueas shown in Equation 1, and different pixel disparities are used toperform the deblocking filtering. In another embodiment, one or morefilters with different properties as provided in Equation 1 and Equation11 and different filters are applied in predetermined units based on thepredetermined criteria. In some embodiments, the same filtercoefficients are used for both the luminance signal (luma) and the colordifference signals (chroma) to provide an implementation of thedeblocking filtering operation.

Δ=Clip3(−t _(c) ,t _(c),(13*(q ₀ −p ₀)+4*(q ₁ −p ₁)−5*(q ₂ −p₂)+16)>>5)  Equation 11

In some embodiments, the predetermined criteria may be defined accordingto the properties of the filters. For example, the linearity shown inEquation 5 may be the criteria of the filtering determination, and suchcriteria as shown in Equation 9 may be added for the determination. Insome embodiments, a whole new criteria may be defined.

In some embodiments, the predetermined criteria may be the relativeblock sizes of blocks P and Q and may be the forementioned linearitiesor the like. For example, the filtering method can be varied based onthe subblock sizes or shapes (rectangle/square; horizontally extendingrectangle, longitudinally extending rectangle or the like).

For example, the deblocking filter 180 can adaptively determine thetarget pixels to be used for filtering based on the predictioninformation (e.g., the intra prediction information or the interprediction information). As used herein, the “intra predictioninformation” or the “inter prediction information” may refer to thesizes or shapes of the subblocks. In addition, the predictioninformation in the case of the inter prediction may be information onthe motion vector, the reference index or the like as used in the interprediction.

As illustrated in FIG. 8, if the blocks P and Q have a different numberof pixels to be filtered, different methods of filtering can be usedrespectively for the block P and the block Q. In some embodiments, thenumber of pixels to be filtered can be determined based on the size ofthe intra prediction block included in the intra prediction information.

FIG. 8 is an exemplary diagram illustrating pixels filtered in block Pand Q in accordance with one or more embodiments. As shown in FIG. 8,the number of pixels filtered in block P are four and the number ofpixels filtered in block Q are six. In some embodiments, determining thenumber of target pixels for filtering can be based on the size of theintra prediction block included in the intra prediction information. Forexample, pixels to be filtered in block P can be two and those in blockQ become four.

Further, the deblocking filter 180 can determine the positions of thetarget pixels (i.e., the filtering direction) based on the orientationor directionality of the intra prediction mode included in the intraprediction information.

FIG. 7 is a block diagram of a configuration of an image decodingapparatus 700 according to one or more embodiments.

The video decoding apparatus 700 according to at least one embodiment ofthe present disclosure may comprise a bitstream decoder 710, an inversescanner 720, an inverse quantization & inverse transform unit 730, aprediction unit 740, an adder 750 and a deblocking filter 760. In someembodiments, one or more components may be selectively omitted accordingto the method of implementation. For example, if the inverse scanner 720is omitted, its function may be incorporated and performed in thebitstream decoder 710.

The bitstream decoder 710 decodes the encoded data to reconstruct theresidual blocks which have been transformed and quantized. In someembodiments, the bitstream decoder is configured to decode the encodeddata to reconstruct a quantized transform coefficient string. In someembodiments, where inverse scanner 720 is not included in video decodingapparatus 700, the bitstream decoder 710 may incorporate thefunctionality of the inverse scanner 720. In these embodiments, thebitstream generator 150 of the video encoding apparatus 100 isimplemented to incorporate the functionality of the scanner 140. Thebitstream decoder 710 may inversely scan the reconstructed quantizedtransform coefficient string to reconstruct the transformed andquantized residual blocks.

In addition to reconstructing the transformed and quantized residualblocks, the bitstream decoder 710 can decode or extract informationrequired for the decoding operation. The information required fordecoding comprises information required for decoding the encodedbitstream in the encoded data, such as information on the block type,intra prediction mode when it is decided as the prediction mode, motionvector when inter prediction mode is decided as the prediction mode,transform and quantization types and the like, although various otherinformation may be included.

In some embodiments, the information on the block type may betransmitted to the inverse quantization & inverse transform unit 730 andthe prediction unit 740. In some embodiments, the information on thetransform and quantization types may be transmitted to the inversequantization & inverse transform unit 730. In some embodiments,information required for the prediction such as intra prediction modeinformation and motion vector information may be transmitted to theprediction unit 740.

Upon receiving the reconstructed transform coefficient stringtransferred from the bitstream decoder 710, the inverse scanner 720inversely scans the reconstructed transform coefficient string toreconstruct the transformed and quantized residual blocks.

In some embodiments, the inverse scanner 720 inversely scans theextracted quantization coefficient string with various inverse scanningmethods of an inverse zigzag scanning and others to generate theresidual blocks having quantized coefficients. In some embodiments, theinverse scanning method is adapted to obtain information on thetransform size from the bitstream decoder 710 and reconstruct theresidual blocks by using the corresponding inverse scanning method.

In some embodiments, when the bitstream generator 150 is implemented toincorporate the functionality of the scanner 140 in the video encodingapparatus 100, the bitstream decoder 710 may incorporate thefunctionality of the inverse scanner 720. In some embodiments, thebitstream decoder 710 or the inverse scanner 720 inversely scans thetransformed and quantized residual blocks according to the transform andquantization types identified by the reconstructed information on thesame. In some embodiments, the inverse scanning method performed by theinverse scanner 720 is a substantial inverse of the scanning methodperformed by the scanner 140 in the video encoding apparatus 100 forscanning the quantized transform coefficients of the transformed andquantized residual blocks, and therefore the detailed description forthe inverse scanning method will be omitted.

The inverse quantization & inverse transform unit 730 reconstructs theresidual blocks by inversely quantizing and inversely transforming thereconstructed transformed and quantized residual blocks. In someembodiments, the inverse quantization & inverse transform unit 730 isconfigured to perform the inverse quantization & inverse transformoperation according to the transform and quantization types identifiedby information transmitted from the bitstream decoding unit 710. In someembodiments, the inverse quantization & inverse transform operationperformed on the transformed and quantized residual blocks according tothe transform and quantization types by the inverse quantization &inverse transform unit 730 is a substantial inverse of the transform &quantization operation performed according to the transform andquantization types by the transform & quantization unit 130 in the videoencoding apparatus 100, and therefore the detailed description for theinverse quantization & inverse transform method will be omitted.

The prediction unit 740 generates a prediction block of the currentblock. In some embodiments, the prediction unit 740 predicts the currentblock by using block type information and the information required forthe prediction, which are transmitted from the bitstream decoder 710. Insome embodiments, the prediction unit 740 determines the size and theshape of the current block according to the block type identified byblock type information, and predicts the current block to generate aprediction block by using the intra prediction mode or motion vectoridentified by the information required for the prediction. In someembodiments, the prediction unit 740 can generate the prediction blockby partitioning the current block into subblocks, predicting eachsubblock, generating prediction subblocks and then combining theprediction blocks.

The adder 750 reconstructs the current block by adding the predictionblocks generated in the prediction unit 740 to the residual blocksreconstructed by the inverse quantization & inverse transform unit 730.

The deblocking filter 760 filters the current block reconstructed by theadder 750. In some embodiments, the reconstructed and filtered currentblocks are accumulated in units of pictures and stored as a referencepicture in a memory (not shown). In some embodiments, the predictionunit 740 uses the reference picture when predicting the subsequent blockor picture.

The deblocking filter 760 filters the current block reconstructed by theadder 750. The method performed by the deblocking filter 760 forfiltering the reconstructed current block is substantially similar tothe method for filtering the current block by the deblocking filter 180in the video encoding apparatus 100, and therefore further detaileddescription thereof will be omitted.

In some embodiments, if the filtering parameter used by the deblockingfiltering is set as a predetermined value, the video decoding apparatus700 may comprise an offset value receiver (not shown) for receiving anoffset value for the corresponding parameter as it is transmitted onbitstream from the video encoding apparatus. The deblocking filter 760can perform the deblocking filtering by using the offset value receivedat the offset value receiver. In some embodiments, the offset valuereceiver may be configured as an independent module or can befunctionally incorporated into the bitstream decoder 710.

In some embodiments, the video encoding/decoding apparatus according tosome embodiments of the present disclosure can be realized by connectinga bitstream or encoded data output terminal of the video encodingapparatus 100 of FIG. 1 to a bitstream input terminal of the videodecoding apparatus 700 of FIG. 7.

In some embodiments, it has been described that the block boundary to befiltered is the boundary between the left block and the right block, buta similar manner of filtering may be performed on the boundary betweenthe lower block and the upper block.

In some embodiments, the number and/or positions of target pixelssubject to the deblocking filtering or the deblocking filtering methodis either identically or differently defined for the P blocks and the Qblocks based on predetermined criteria to improve the encoding/decodingefficiency.

In the description above, although each of the components of theembodiments of the present disclosure may have been explained asassembled or operatively connected as a unit, one of ordinary skillwould understand the present disclosure is not limited to suchembodiments. Rather, within some embodiments of the objective scope ofthe present disclosure, the respective components are selectively andoperatively combined in any numbers of ways. In some embodiments, eachof the components is capable of being implemented alone in hardware orcombined in part or as a whole and implemented in a computer programhaving program modules residing in computer readable media and causing aprocessor or microprocessor to execute functions of the hardwareequivalents. The computer program is stored in a non-transitory computerreadable media, which in operation realizes at least one embodiment ofthe present disclosure. The computer readable media includes, but arenot limited to, magnetic recording media and optical recording media insome embodiments.

In addition, one of ordinary skill would understand terms like‘include’, ‘comprise’, and ‘have’ to be interpreted in default asinclusive or open-ended rather than exclusive or close-ended unlessexpressly defined to the contrary. All terms that are technical,scientific or otherwise agree with meanings as understood by a personskilled in the art remain so unless defined to the contrary.

Although exemplary embodiments of the present disclosure have beendescribed for illustrative purposes, those skilled in the art willappreciate that various modifications, additions and substitutions arepossible, without departing from the various characteristics of thedisclosure. Therefore, exemplary embodiments of the present disclosurehave been described for the sake of brevity and clarity. Accordingly,one of ordinary skill would understand the scope of the disclosure isnot to be limited by the explicitly described above embodiments.

What is claimed is:
 1. A video encoding apparatus, comprising: a videoencoder configured to: generate a prediction block by predicting acurrent block, generate a residual block by subtracting the predictionblock from the current block, encode the residual block by transformingand quantizing the residual block, reconstruct the residual block byinversely quantizing and inversely transforming the transformed andquantized residual block, and reconstruct the current block by addingthe prediction block to the reconstructed residual block; and adeblocking filter configured to filter a boundary between subblockswithin a frame including the reconstructed current block, wherein afirst subblock of the subblocks and a second subblock of the subblocksthat engage in the filtering are different from each other in numbers offiltered pixels, depending on one or more predetermined criterion. 2.The video encoding apparatus of claim 1, wherein the one or morepredetermined criterion comprises a linearity of pixel values in a rowof pixels in a direction of depth from the boundary between the firstsubblock and the second subblock.
 3. The video encoding apparatus ofclaim 1, wherein the one or more predetermined criterion comprises alinearity of pixel values of subblocks in a direction of depth from theboundary between the first subblock and the second subblock.
 4. Thevideo encoding apparatus of claim 2, wherein the number of filteredpixels in a subblock determined to be linear is greater than the numberof filtered pixels in a subblock determined to be nonlinear.
 5. Thevideo encoding apparatus of claim 3, wherein the number of filteredpixels in a subblock determined to be linear is greater than the numberof filtered pixels in a subblock determined to be nonlinear.
 6. Thevideo encoding apparatus of claim 3, wherein the linearity of pixelvalues of subblocks is obtained by selecting one or more rows of pixelsand using the linearity of pixels in each of the rows of pixels.
 7. Thevideo encoding apparatus of claim 1, wherein the deblocking filter isconfigured to perform the filtering on each of the first and secondsubblocks by applying different pixel disparity values according topixel positions relative to the boundary between the first and secondsubblocks.
 8. The video encoding apparatus of claim 1, wherein thedeblocking filter is configured to adaptively determine the pixelssubject to filtering based on prediction information used to predict thecurrent block.
 9. The video encoding apparatus of claim 8, wherein thedeblocking filter is configured to determine the number of the pixelssubject to filtering based on the size of the prediction block containedin the prediction information.
 10. A video decoding apparatus,comprising: a bitstream decoder configured to generate a quantizedfrequency transform block from a bitstream; an inverse quantization andinverse transform unit configured to reconstruct a residual block byinversely quantizing and inversely transforming the quantized frequencytransform block; a prediction unit configured to generate a predictionblock from a current block; an adder configured to reconstruct thecurrent block by adding the generated prediction block to thereconstructed residual block; and a deblocking filter configured tofilter a boundary between subblocks within a frame including thereconstructed current block, wherein a first subblock of the subblocksand a second subblock of the subblocks that engage in the filtering aredifferent from each other in numbers of filtered pixels, depending onone or more predetermined criterion.
 11. The video decoding apparatus ofclaim 10, wherein the one or more predetermined criterion comprises alinearity of pixel values in a row of pixels in a direction of depthfrom the boundary between the first subblock and the second subblock.12. The video decoding apparatus of claim 10, wherein the one or morepredetermined criterion comprises a linearity of pixel values ofsubblocks in a direction of depth from the boundary between the firstsubblock and the second subblock.
 13. The video decoding apparatus ofclaim 11, wherein the number of filtered pixels in a subblock determinedto be linear is greater than the number of filtered pixels in a subblockdetermined to be nonlinear.
 14. The video decoding apparatus of claim12, wherein the number of filtered pixels in a subblock determined to belinear is greater than the number of filtered pixels in a subblockdetermined to be nonlinear.
 15. The video decoding apparatus of claim12, wherein the linearity of pixel values of subblocks is obtained byselecting one or more rows of pixels and using the linearity of pixelsin each of the rows of pixels.
 16. The video decoding apparatus of claim10, wherein the deblocking filter is configured to perform the filteringon each of the first and second subblocks by applying different pixeldisparity values according to pixel positions relative to the boundarybetween the first and second subblocks.
 17. The video decoding apparatusof claim 10, further comprising an offset receiver configured to receivean offset value of a filtering parameter of the deblocking filtering ifthe filtering parameter is set as a predetermined value.
 18. The videodecoding apparatus of claim 10, wherein the deblocking filter isconfigured to adaptively determine the pixels to be filtered based onprediction information used to predict the current block.
 19. The videodecoding apparatus of claim 18, wherein the deblocking filter isconfigured to determine the pixels to be filtered based on the size ofthe prediction block contained in the prediction information.
 20. Thevideo decoding apparatus of claim 18, wherein the deblocking filter isconfigured to determine a direction of filtering of the pixels based onan intra prediction mode contained in the prediction information, if theprediction block is generated by intra prediction.
 21. A video decodingmethod, comprising: generating a quantized frequency transform block bydecoding a bitstream; reconstructing a residual block by inverselyquantizing and inversely transforming the quantized frequency transformblock; generating a prediction block by predicting a current block to bereconstructed; reconstructing the current block by adding the generatedprediction block to the reconstructed residual block; and performing adeblocking filtering with respect to a boundary between subblocks withina frame including the reconstructed current block, by allowing numbersof filtered pixels in a first block of the subblocks and a second blockof the subblocks that engage in the filtering to be different dependingon one or more predetermined criterion.